﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" Inherits="FormatTable" Title="Untitled Page" Codebehind="FormatTable.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <div  class="content" style="height: 445px; width: 908px"> 
        <asp:CheckBox ID="cbUjTabla" runat="server" Text="Új tábla létrehozása " 
            AutoPostBack="True" oncheckedchanged="cbUjTabla_CheckedChanged"/> <br />     
        <asp:Label ID="Label2" runat="server" Text="Új tábla: "></asp:Label>
        <asp:TextBox ID="TextBoxTableName" runat="server"></asp:TextBox>&nbsp; 
        <asp:Label ID="labelHelytelenTablanev" runat="server" Text="Helytelen tablanev!" Visible="false" ForeColor="Red"></asp:Label><br /> 
        <asp:Label ID="Label1" runat="server" Text="Válassz egy táblát: "></asp:Label>
        <asp:DropDownList ID="DropDownListTables" runat="server" 
            onselectedindexchanged="DropDownListTables_SelectedIndexChanged" 
            AutoPostBack="True"></asp:DropDownList> &nbsp; &nbsp; &nbsp;
        <asp:Button ID="btnDeleteTable" runat="server" Text="Tabla torlese" 
            onclick="btnDeleteTable_Click" PostBackUrl="~/FormatTable.aspx" />
        <br />                
        <br />                        
        <table style="width: 90%">
            <tr>
                <td>Attributum &nbsp;</td>
                <td>Tipus &nbsp;</td>
                <td>Hossz</td>
                <td>Elsodleges kulcs &nbsp;</td>
                <td style="width: 51px">NULL &nbsp;</td>
                <td style="width: 27px">Kulso kulcs &nbsp;</td>
                <td>Tabla / attributum </td>
                <td style="width: 73px">Egyedi kulcs &nbsp;</td>
                <td style="width: 73px">Attributum torlese &nbsp;</td>
            </tr>
            <tr>
                <td><asp:TextBox ID="tbAttr1" runat="server"></asp:TextBox>&nbsp;</td>
                <td><asp:DropDownList ID="ddlTipus1" runat="server" Width="100px" 
                        AutoPostBack="True" onselectedindexchanged="ddlTipus1_SelectedIndexChanged"></asp:DropDownList>&nbsp;</td>
                <td><asp:TextBox ID="tbHossz1" runat="server" Width="20px"></asp:TextBox></td>
                <td style="width: 111px"> <asp:CheckBox ID="cbPrimKey1" runat="server" /></td>
                <td style="width: 51px"> <asp:CheckBox ID="cbIsnull1" runat="server" /></td>
                <td style="width: 27px"> <asp:CheckBox ID="cbForeignKey1" runat="server" 
                        AutoPostBack="True" oncheckedchanged="cbForeignKey1_CheckedChanged" /></td>
                <td> 
                    <asp:DropDownList ID="ddlFkTable1" runat="server" 
                        onselectedindexchanged="ddlFkTable1_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList><br />                    
                    <asp:DropDownList ID="ddlFKAttr1" runat="server"></asp:DropDownList>
                </td>
                <td style="width: 73px"> <asp:CheckBox ID="cbUniqKey1" runat="server" /></td>
                <td style="width: 50px"> <asp:CheckBox ID="cbDelete1" runat="server" /></td>
            </tr>
             <tr>
                <td><asp:TextBox ID="tbAttr2" runat="server"></asp:TextBox>&nbsp;</td>
                <td><asp:DropDownList ID="ddlTipus2" runat="server" Width="100px" 
                        AutoPostBack="True" onselectedindexchanged="ddlTipus2_SelectedIndexChanged"></asp:DropDownList>&nbsp;</td>
                <td><asp:TextBox ID="tbHossz2" runat="server" Width="20px"></asp:TextBox></td>
                <td style="width: 111px"> <asp:CheckBox ID="cbPrimKey2" runat="server" /></td>
                <td style="width: 51px"> <asp:CheckBox ID="cbIsnull2" runat="server" /></td>
                <td style="width: 27px"> 
                    <asp:CheckBox ID="cbForeignKey2" runat="server" 
                        oncheckedchanged="cbForeignKey2_CheckedChanged" AutoPostBack="True" /></td>
                <td> 
                    <asp:DropDownList ID="ddlFkTable2" runat="server" 
                        onselectedindexchanged="ddlFkTable2_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList> <br />
                    <asp:DropDownList ID="ddlFKAttr2" runat="server"></asp:DropDownList>
                </td>
                <td style="width: 73px"> <asp:CheckBox ID="cbUniqKey2" runat="server" /></td>
                <td style="width: 50px"> <asp:CheckBox ID="cbDelete2" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:TextBox ID="tbAttr3" runat="server" Visible="true"></asp:TextBox>&nbsp;</td>
                <td><asp:DropDownList ID="ddlTipus3" runat="server" Visible="true" Width="100px" 
                        AutoPostBack="True" onselectedindexchanged="ddlTipus3_SelectedIndexChanged"></asp:DropDownList>&nbsp;</td>
                <td><asp:TextBox ID="tbHossz3" runat="server" Width="20px"></asp:TextBox></td>
                <td style="width: 111px"> <asp:CheckBox ID="cbPrimKey3" runat="server" 
                        Visible="true"/></td>
                <td style="width: 51px"> <asp:CheckBox ID="cbIsnull3" runat="server" /></td>
                <td style="width: 27px"> 
                    <asp:CheckBox ID="cbForeignKey3" runat="server" 
                        oncheckedchanged="cbForeignKey3_CheckedChanged" AutoPostBack="True" /></td>
                <td> 
                    <asp:DropDownList ID="ddlFkTable3" runat="server" 
                        onselectedindexchanged="ddlFkTable3_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList> <br />
                    <asp:DropDownList ID="ddlFKAttr3" runat="server"></asp:DropDownList>
                </td>
                <td style="width: 73px"> <asp:CheckBox ID="cbUniqKey3" runat="server" /></td>                
                <td style="width: 50px"> <asp:CheckBox ID="cbDelete3" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:TextBox ID="tbAttr4" runat="server" Visible="true"></asp:TextBox>&nbsp;</td>
                <td><asp:DropDownList ID="ddlTipus4" runat="server" Visible="true" Width="100px" 
                        AutoPostBack="True" onselectedindexchanged="ddlTipus4_SelectedIndexChanged"></asp:DropDownList>&nbsp;</td>
                <td><asp:TextBox ID="tbHossz4" runat="server" Width="20px"></asp:TextBox></td>
                <td style="width: 111px"> <asp:CheckBox ID="cbPrimKey4" runat="server" 
                        Visible="true"/></td>
                <td style="width: 51px"> <asp:CheckBox ID="cbIsnull4" runat="server" /></td>
                <td style="width: 27px"> 
                    <asp:CheckBox ID="cbForeignKey4" runat="server" 
                        oncheckedchanged="cbForeignKey4_CheckedChanged" AutoPostBack="True" /></td>
                <td> 
                    <asp:DropDownList ID="ddlFkTable4" runat="server" 
                        onselectedindexchanged="ddlFkTable4_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList> <br />
                    <asp:DropDownList ID="ddlFKAttr4" runat="server"></asp:DropDownList>
                </td>
                <td style="width: 73px"> <asp:CheckBox ID="cbUniqKey4" runat="server" /></td>
                <td style="width: 50px"> <asp:CheckBox ID="cbDelete4" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:TextBox ID="tbAttr5" runat="server" Visible="true"></asp:TextBox>&nbsp;</td>
                <td><asp:DropDownList ID="ddlTipus5" runat="server" Visible="true" Width="100px" 
                        AutoPostBack="True" onselectedindexchanged="ddlTipus5_SelectedIndexChanged"></asp:DropDownList>&nbsp;</td>
                <td><asp:TextBox ID="tbHossz5" runat="server" Width="20px"></asp:TextBox></td>
                <td style="width: 111px"> <asp:CheckBox ID="cbPrimKey5" runat="server" 
                        Visible="true"/></td>
                <td style="width: 51px"> <asp:CheckBox ID="cbIsnull5" runat="server" /></td>
                <td style="width: 27px"> 
                    <asp:CheckBox ID="cbForeignKey5" runat="server" 
                        oncheckedchanged="cbForeignKey5_CheckedChanged" AutoPostBack="True" /></td>
                <td> 
                    <asp:DropDownList ID="ddlFkTable5" runat="server" 
                        onselectedindexchanged="ddlFkTable5_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList> <br />
                    <asp:DropDownList ID="ddlFKAttr5" runat="server"></asp:DropDownList>
                </td>
                <td style="width: 73px"> <asp:CheckBox ID="cbUniqKey5" runat="server" /></td>
                <td style="width: 50px"> <asp:CheckBox ID="cbDelete5" runat="server" /></td>
            </tr>
        </table>
        &nbsp;
        <br />
        <asp:Button ID="ButtonSave" runat="server" Text="Mentes" 
            onclick="ButtonSave_Click" PostBackUrl="~/FormatTable.aspx" /> &nbsp;
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <asp:Button ID="btnDeleteAttr" runat="server" Text="Attributumok torlese" 
            PostBackUrl="~/FormatTable.aspx" onclick="btnDeleteAttr_Click" Width="144px" />
        <br />
        
    </div>
</asp:Content>

